//
//  YiBaojiaTableViewCell.m
//  Mahjong
//
//  Created by mc on 16/9/10.
//  Copyright © 2016年 Elliot. All rights reserved.
//

#import "YiBaojiaTableViewCell.h"

@implementation YiBaojiaTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imgView = [[UIImageView alloc] init];
        _imgView.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:_imgView];
        
        self.labelCount = [[UILabel alloc] init];
        _labelCount.textColor = [UIColor grayColor];
//        _labelCount.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_labelCount];
        
        self.labelCost = [[UILabel alloc] init];
//        _labelCost.backgroundColor = [UIColor redColor];
        _labelCost.textColor = [UIColor grayColor];
        _labelCost.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_labelCost];
        
        self.lineView = [[UIView alloc] init];
        self.lineView.backgroundColor = [UIColor colorWithWhite:0.900 alpha:1.000];
        [self.contentView addSubview:_lineView];
    }
    return self;
}
-(void)layoutSubviews{
    [super layoutSubviews];
    self.imgView .frame = CGRectMake(15, 5, self.contentView.frame.size.height - 10, self.contentView.frame.size.height - 10);
    self.labelCount.frame = CGRectMake(15 + self.contentView.frame.size.height +5, 0, 100, self.contentView.frame.size.height);
    self.labelCost.frame = CGRectMake(self.contentView.frame.size.width - 100, 0, 100, self.contentView.frame.size.height);
    self.lineView.frame = CGRectMake(0, self.contentView.frame.size.height - 1, self.contentView.frame.size.width, 1);
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
